<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      div {
        width: 300px;
        height: 300px;
        border: 1px solid #bfa;
      }
    </style>
  </head>
  <body>
    <div></div>
    <!-- 
      用过标签实现同源
        img link iframe script自带跨域能力
        jsonp利用script实现跨域
     -->
    <script>
      function handle(data) {
        const div = document.querySelector('div')
        div.innerHTML = data.name + ':' + data.age
      }
    </script>
    <script src="http://127.0.0.1:9527/jsonp"></script>
  </body>
</html>
